{inc:header}
<form action="admin.php" method="post">
	<div class="form-group">
		<label class="control-label">栏目名称：</label>
		<input class="form-control" name="name" type="text" id="name"  value="{$o['name']}"/>
	</div>
    <div class="form-group">
		<label class="control-label">SEO关键词：</label>
		<input class="form-control" name="keywords" type="text" id="keywords"  value="{$o['keywords']}"/>
	</div>
    <div class="form-group">
		<label class="control-label">SEO描述：</label>
		<textarea class="form-control" rows="3" name="description" id="description">{$o['description']}</textarea>
	</div>
	<div class="form-group">
		<label class="control-label">栏目别名：</label>
		<input class="form-control" name="nickname" type="text" id="nickname"  value="{$o['nickname']}"/>
	</div>
	<div class="form-group">
		<label class="control-label">上级栏目：</label>
		<SELECT class="form-control"  name="fid" id="fid">
			<option value="">未分组</option>
            <?php $dbit=new Dbclass(SYS_ROOT.DB_NAME); ?>
            <!-- list:category|status=1 and fid=''|20|orders ASC-->
            <option value="{$list['id']}"  <!-- if($list['id']==$o['fid']) -->selected<!-- end --> >{$list['name']}</option>
            <?php
                $fid = $list['id'];
                $pre = '';
                $db=new Dbclass(SYS_ROOT.DB_NAME);
                $cat_child = $db->getlist(TB.'category','fid = '.$fid,'*');
                while (!empty($cat_child)) {
            ?>
            <!-- $cat_child as $row -->
            <?php $pre .= '─'; ?>
            <option value="{$row['id']}"  <!-- if($row['id']==$o['fid']) -->selected<!-- end --> >{$pre} {$row['name']}</option>
            <!-- end -->
            <?php $cat_child = $db->getlist(TB.'category','fid = '.$row['id'],'*'); ?>
            <?php } ?>
            <!-- END -->
		</SELECT>
	</div>
	<div class="form-group">
		<label class="control-label">首页模板：</label>
		<SELECT class="form-control"  name="cattpl" id="cattpl">
			<option value="">默认模板</option>
			<!-- $tpllist AS $tpls --> 
			<option value="{$tpls}"  <!-- if($tpls==$o['cattpl']) -->selected<!-- end --> >{$tpls}
					
			</option>
			<!-- END -->
		</SELECT>
	</div>
	<div class="form-group">
		<label class="control-label">列表页模板：</label>
		<SELECT class="form-control"  name="listtpl" id="listtpl">
			<option value="">默认模板</option>
			<!-- $tpllist AS $tpls --> 
			<option value="{$tpls}"  <!-- if($tpls==$o['listtpl']) -->selected<!-- end --> >{$tpls}
					
			</option>
			<!-- END -->
		</SELECT>
	</div>
	<div class="form-group">
		<label class="control-label">内容页模板：</label>
		<SELECT class="form-control"  name="distpl" id="distpl">
			<option value="">默认模板</option>
			<!-- $tpllist AS $tpls --> 
			<option value="{$tpls}"  <!-- if($tpls==$o['distpl']) -->selected<!-- end --> >{$tpls}
					
			</option>
			<!-- END -->
		</SELECT>
	</div>
	<div class="form-group">
		<label class="control-label">栏目描述：</label>
		<textarea class="form-control" rows="3" name="intro" id="intro">{$o['intro']}</textarea>
	</div>
	<div class="form-group">
		<label class="control-label">排序：</label>
		<input class="form-control" name="orders" type="text" id="orders" value="{$o['orders']}" />
	</div>
	<div class="form-group">
		<label class="control-label">状态：</label>
		<SELECT class="form-control"  name="status" id="status">
			<option value="0" >隐藏</option>
			<option value="1" selected >显示</option>
		</SELECT>
	</div>
	<div class="form-group">
		<input name="action" type="hidden" value="category" />
		<input name="id" type="hidden" value="{$o['id']}" />
		<input name="ctrl" type="hidden" value="{$goctrl}" />
		<input class="btn btn-primary" type="submit" name="Submit" id="submits" value="提交" />
	</div>
</form>
<script>
SelectItemByValue($track('status'),{$o['status']});
</script> 
{inc:footer}